Skip to content

Conversation

Paillat-dev
Copy link
Member

@Paillat-dev Paillat-dev commented Nov 28, 2024

Summary

InteractionPayload["channel"] is partial, thus, when creating a GuildChannel object from it, some attributes were missing/incorrectly set. With this pr, InteractionPayload["channel"] is used only in the following cases:

  1. When the interaction happens in private channels.
  2. When the channel is missing from the bot's cache.

In all other cases, it uses the full channel object from the cache.

Information

  • This PR fixes an issue.
    fixes: permissions_for returning wrong permissions #2281
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.

@Paillat-dev Paillat-dev force-pushed the fix-interaction-channel-perms branch from 8683daa to 96a3141 Compare November 28, 2024 08:57
@Paillat-dev Paillat-dev changed the title 🐛 Fix Interaction.channel incorrectly set fix: 🐛 Fix Interaction.channel incorrectly set Nov 28, 2024
@NeloBlivion
Copy link
Member

Removing cached_channel makes this a breaking change; at most, it should be deprecated.

@Paillat-dev
Copy link
Member Author

Ok

Copy link
Member

@JustaSqu1d JustaSqu1d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix changelog entry

Lulalaby
Lulalaby previously approved these changes Dec 23, 2024
@Paillat-dev Paillat-dev requested a review from Dorukyum December 27, 2024 22:41
Dorukyum
Dorukyum previously approved these changes Dec 28, 2024
@Lulalaby Lulalaby enabled auto-merge (squash) January 10, 2025 05:49
@Lulalaby Lulalaby merged commit 24c1a8e into Pycord-Development:master Jan 10, 2025
25 checks passed
@Dorukyum
Copy link
Member

Should've added a changelog entry under "Deprecated".

@Paillat-dev Paillat-dev deleted the fix-interaction-channel-perms branch January 10, 2025 11:14
@Paillat-dev
Copy link
Member Author

I'll open another pr

@Dorukyum
Copy link
Member

No need, I'll push it while updating the changelog at the time of release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

permissions_for returning wrong permissions

5 participants